<!--新建动漫的页面模板-->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layouts::header"></head>

<body class="bg">

<nav th:replace="layouts::navbar"></nav>

<div class="container">
    <form th:action="@{/projects/save}" th:object="${project}" method="POST">
        <input type="text" placeholder="动漫名称" th:field="*{name}">
        <select th:field="*{stage}">
            <option value="未上线">未上线</option>
            <option value="连载中">连载中</option>
            <option value="已完结">已完结</option>
        </select>
        <input type="text" placeholder="出版年代" th:field="${project.years}">
        <textarea type="text" placeholder="输入动漫描述" th:field="*{description}"></textarea>
        <select th:field="*{authors}" multiple="multiple">
            <option th:each="author : ${allAuthors}"th:value="${author.authorId}"th:text="${author.name}"></option>
        </select>
        <select th:field="*{countries}" multiple="multiple">
            <option th:each="country : ${allCountries}"th:value="${country.countryId}"th:text="${country.name}"></option>
        </select>
        <select th:field="*{classifications}" multiple="multiple">
            <option th:each="classification : ${allClassifications}"th:value="${classification.classificationId}"th:text="${classification.name}"></option>
        </select>
        <button type="submit">新建动漫</button>
    </form>
</div>
</body>
</html>